<template>
	<view class="wrapper pingzheng">
		<u--form :model="form" ref="uForm" label-width="150rpx">
			<u-form-item label="微信昵称" prop="name" borderBottom="true">
				<u-input v-model="form.name" border="none" placeholder="请输入" placeholder-class="f28 c9b"
					inputAlign="right" />
			</u-form-item>
			<u-form-item label="手机号" prop="name" borderBottom="true">
				<u-input v-model="form.name" border="none" placeholder="请输入" placeholder-class="f28 c9b"
					inputAlign="right" />
			</u-form-item>
			<u-form-item label="姓名" prop="name" borderBottom="true">
				<u-input v-model="form.name" border="none" placeholder="请输入" placeholder-class="f28 c9b"
					inputAlign="right" />
			</u-form-item>
			<u-form-item label="身份证号" prop="name" borderBottom="true">
				<u-input v-model="form.name" border="none" placeholder="请输入" placeholder-class="f28 c9b"
					inputAlign="right" />
			</u-form-item>
			<u-form-item label="性别" prop="name" borderBottom="true">
				<u-input v-model="form.name" border="none" placeholder="请输入" placeholder-class="f28 c9b"
					inputAlign="right" />
			</u-form-item>
			<u-form-item label="生日" prop="name" borderBottom="true">
				<u-input v-model="form.name" border="none" placeholder="请输入" placeholder-class="f28 c9b"
					inputAlign="right" />
			</u-form-item>
		</u--form>
		<div class="mt40">
				<u-button type="primary" @click="submit">确定提交</u-button>
			</div>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				form: {
					name: '',
				},
				rules: {
					name: [{
						required: true,
						message: '请输入姓名',
						trigger: ['blur', 'change']
					}]
				}
			}
		},
		methods: {
			submit() {
				this.$refs.uForm.validate().then(res => {
					uni.$u.toast('校验通过')
				}).catch(errors => {
					uni.$u.toast('校验失败')
				})
			}
		}
	}
</script>

<style lang="scss">
	:deep(.u-form-item__body) {
		padding: 45rpx 0 25rpx!important;
	}

	.pingzheng {
		padding:0 38rpx;
	}
</style>